package com.wyx.bbs.service;

import com.wyx.bbs.domain.ThumbsUp;
import com.wyx.bbs.mapper.ThumbsUpMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * TODO
 *
 * @Author xiaomao
 * @Date 2021/3/31 22:12
 */
@Service
public class ThumbsUpService {

    @Resource
    ThumbsUpMapper thumbsUpMapper;
    /**
     * 点赞操作
     * @return
     */
    public int addThumbsUp(ThumbsUp thumbsUp){
        int isThumbsUp = thumbsUp.getIsThumbsUp();
//        if(isThumbsUp != 0){
            return thumbsUpMapper.addThumbsUp(thumbsUp);
//        }
//        return thumbsUpMapper.delThumbsUp(thumbsUp);
    }

}
